//== Checkout
//

// General
.mp_checkout {
	
	&_section {
		border-bottom: 1px solid transparent;
		margin-bottom: $space;
		
		&:last-of-type {
			border-bottom: none;
			margin-bottom: 0;
		}
		
		// Show Current Section Content
		&.current {
			padding-bottom: $space;
			
			.mp_checkout_section_content {
				display: block;
			}
			
		}
		
		// Heading
		.mp_checkout_section_heading {
			margin: 0 0 $space;
		
			&-link {
				border-bottom: none;
				text-decoration: none;
			}
		}
		
		// Checkout Section Numbers
		.mp_checkout_step_num {
			display: inline-block;
			padding: $space--xs $space--s;
		}
		
		// Errors
		&_errors {
			display: none;
			padding: $space--m;
		
			h4 {
				margin: 0 0 $space--m;
			}
			
			p {
				margin: 0;
				
				span {
					text-decoration: underline;
				}
			}
			
			ul {
				list-style: none;
				margin: 0;
				padding: 0;
			}
			
			&.show {
				display: block;
				margin-bottom: $space;
			}
		}
		
		// Content
		&_content {
			@include j-cf();
			display: none;
			
			h3,
			h4 {
				margin: 0 0 $space--m;
			}
			p {
				margin-bottom: $space--s;
			}
			
			// Select2 3.5.x (countries, etc...)
			div.select2-container {
		
				.select2-choice {
					height: 48px;
					line-height: 48px;
					
					.select2-arrow {
						b {
							background-position: 1px 10px;
						}
					}
				}
				
				// Open
				&.select2-dropdown-open {
				
					.select2-choice {
						
						.select2-arrow {
							b {
								background-position: -16px 10px;
							}
						}
					}
					
				}
				
			}
			
			// Select2 4.x
			.select2 {
				
				// Container
				&-container {
				
					// Selection
					.select2-selection {
						&.mp_select2,
						&.mp_select2_search {
							height: 48px;
							line-height: 48px;
							
							.select2-selection {
								&__rendered {
									line-height: 48px;
								}
								&__arrow {
									height: 48px;
								}
							}
						}
					}
					
				}
				
			}
	
		}
		
		// Review: Payment
		&-order-review-payment {}
		
	}
	
	// Columns / Grid
	&_column {
		//@include stack();
		margin-bottom: $space;
		overflow: hidden;
		width: 100%;
		
		&:last-of-type {
			margin-bottom: 0;
		}
		
		&.fullwidth {
			margin-bottom: 0;
		}
		
		&:not(.fullwidth) {
			@include bp(desktop) {
				//@include unstack();
				@include j-column(1/2);
				margin-bottom: 0;
			}
			
			+ .mp_checkout_column {
				margin-right: 0;
			}
		}
		
		// As Section/Block
		&_section {
			margin-bottom: $space;
			overflow: hidden;	
			width: 100%;
		}
	}
	
	// Fields
	&_fields {
		@include j-cf();
		//margin-bottom: $space--m;
	}
	// Field
	&_field {
		&:not(.mp_checkout_column) {
			@include j-span(1);
		}
		margin-bottom: $space--m;
		overflow: hidden;
	}
	// Checkbox
	&_checkbox {
		input[type="checkbox"],
		input[type="radio"] {
			margin-right: $space--xs;
		}
	}
	
	// ???
	label.mp-checkout-column {
		> span {}
	}
	
	// Checkout Buttons
	&_buttons {
		@include j-cf();
		clear: both;
		//margin-top: $space--m;
		//overflow: hidden;
		
		.mp_button {
			
			&-checkout-prev-step {
				//border-bottom: none;
				float: left;
			}
			
			&-checkout-next-step {
				float: right;
			}
			
			&.disabled {
				display: none;
			}
		}

	}
	
	// Payment Options
	.mp_gateway_form {
		padding: $space--xs;
	}
	
}

// Checkout Form
#mp-checkout-form {
	position: relative;
	//z-index: 1;
	z-index: 0;
	
	// Form Elements
	.mp_form {
		
		// Checkout Radio Options
		&_label-checkout-option {
			margin-bottom: $space--s;
		
			&:last-of-type {
				margin-bottom: 0;
			}
			
			input {
				margin-right: $space--xs;
			}
		}
	
	}
	
	// Buttons
	.mp_button {
		
		// Login
		&-checkout-login {
			float: right;
		}
		
		// Next Step
		&-checkout-next-step {
			float: right;
		}
		
	}
	
}

#is_checkout_as_guest {
	display: none;
}